package com.skyz.wrap.manager;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

public class RouteManager {

    private ShowActivityListener mShowActivityListener = null;

    private RouteManager() {
    }

    private static class InstanceHolder {
        private static final RouteManager instance = new RouteManager();
    }

    public static RouteManager getInstance() {
        return InstanceHolder.instance;
    }

    public void setShowActivityListener(ShowActivityListener showActivityListener) {
        this.mShowActivityListener = showActivityListener;
    }

    public void showActivity(Context context, String activityName) {
        showActivity(context, activityName, null);
    }

    public void showActivity(Context context, String activityName, Bundle bundle) {
        if (mShowActivityListener != null) {
            mShowActivityListener.onShowActivity(context, activityName, bundle);
        }
    }

    public interface ShowActivityListener {
        void onShowActivity(Context context, String activityName, Bundle bundle);
    }
}
